#pragma once

#include "LogWindow.h"

#include "../Framework/Win32SizeRuler.h"
#include "../Framework/TabWindow.h"

class CFrameWindow : public CWin32SizeRuler
{
	struct sPluginData
	{
		HMODULE		m_hModule;
		ISMPlugin*	m_pSMPlugin;
		std::string m_szModulePath;
	};

public:
	CFrameWindow();
	virtual ~CFrameWindow();

	bool	Create(HINSTANCE hInstance);
	void	Release();

protected:
	HWND		m_hPluginTreeView;
	CTabWindow	m_TabWindow;
	CLogWindow	m_LogWindow;

	typedef std::list<sPluginData*>	PLUGINLIST;
	PLUGINLIST	m_PluginList;

	//CGFXSMCFileManager	m_GFXSMCFileManager;

	bool		bIsLoadFileManager;

	bool		LoadPlugins();

protected:
	LRESULT		OnExit(WPARAM wParam,LPARAM lParam);
	LRESULT		OnLoadPlugins(WPARAM wParam,LPARAM lParam);

	LRESULT		OnEraseBkGnd(WPARAM wParam,LPARAM lParam);
	LRESULT		OnNotify(WPARAM wParam,LPARAM lParam);
	LRESULT		OnLog(WPARAM wParam,LPARAM lParam);

	LRESULT		OnWM_SMNET_MSG_RECEIVED(WPARAM wParam,LPARAM lParam);
	LRESULT		OnWM_SMNET_MSG_CONNECTED(WPARAM wParam,LPARAM lParam);
	LRESULT		OnWM_SMNET_MSG_DISCONNECTED(WPARAM wParam,LPARAM lParam);

	LRESULT		OnWM_MEASUREITEM(WPARAM wParam,LPARAM lParam);
	LRESULT		OnWM_DRAWITEM(WPARAM wParam,LPARAM lParam);


	LRESULT		OnReturnWindow(WPARAM wParam,LPARAM lParam);
};